<?php
include_once $_SERVER['DOCUMENT_ROOT'].'HelmesWorkTest/backend/services/PersonSectorInvolvementService.php';
include_once $_SERVER['DOCUMENT_ROOT'].'HelmesWorkTest/backend/services/implementations/PersonSectorInvolvementServiceImpl.php';
include_once $_SERVER['DOCUMENT_ROOT'].'HelmesWorkTest/backend/model/data/view/PersonSectorInvolvementFormData.php';
/**
 * Description of TEST_PersonSectorInvolvementService
 *
 * @author Reinowin7
 */
class TEST_PersonSectorInvolvementService 
{
    public function main()
    {
        $personSectorInvolvementService = new PersonSectorInvolvementServiceImpl();
        //print_r($personSectorInvolvementService->getListOfAllSectors());
        
        $personSectorsInvolvementFormData = new PersonSectorInvolvementFormData();
        $person = new Person();
        //id ainult update lause tarbeks 
        $person->setPersonID(7);
        $person->setName('Reino Testist updated');
        $personSectorsInvolvementFormData->setPerson($person);
        $personSectorInvolvement = new PersonSectorInvolvement();
        $personSectorInvolvement->setSectorFK(269);
        $personSectorInvolvement->setAgreesToTerms(false);
        $listOfPersonSectorInvolvement = array();
        array_push($listOfPersonSectorInvolvement, $personSectorInvolvement);
        
        $personSectorsInvolvementFormData->setPerson($person);
        $personSectorsInvolvementFormData->setListOfPersonSectorInvolvements($listOfPersonSectorInvolvement);
        
        //$successIndicator = $personSectorInvolvementService->insertPersonWithSectorInvolvements($personSectorsInvolvementFormData);
        
        
        $successIndicator = $personSectorInvolvementService->updatePersonWithSectorInvolvements($personSectorsInvolvementFormData);
        echo '<br/>'. $successIndicator;
    }
}

 $test_PersonSectorInvolvementService = new TEST_PersonSectorInvolvementService();
 $test_PersonSectorInvolvementService->main();

?>
